package com.cy.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cy.common.vo.IndexBrand;
import com.cy.common.vo.IndexCate;
import com.cy.dao.SysCateGoryDao;
import com.cy.dao.SysGoodsListDao;
import com.cy.entity.SysCategory;
import com.cy.service.SysCateService;

/**  
 * @Title:  SysCateServiceImpl.java   
 * @Package com.cy.service.impl   
 * @Description:    描述   
 * @author: ZHANGSIMIN     
 * @date:   2019年10月22日 下午2:59:49   
 * @version V1.4 
 */
@Service
public class SysCateServiceImpl implements SysCateService{

	
	@Autowired
	private SysCateGoryDao sysCateGoryDao;
	
	@Autowired
	private SysGoodsListDao sysGoodsListDao;
	
	@Override
	public IndexCate getCateList() {
		IndexCate result = new IndexCate();
		List<SysCategory> firstCate = sysCateGoryDao.getFirstCate();
		List<SysCategory> secondCate = sysCateGoryDao.getSecondCate();
		List<IndexBrand> brands = sysCateGoryDao.getBrands();
		result.setFirstCate(firstCate);
		result.setSecondCate(secondCate);
		result.setBrandsList(brands);
		return result;
	}
	
}
